<?php
class Db_GetStaticPage extends Model_Db_Core{

	protected  $con = null;
	protected  $user_id = null;
	protected  $page = null;

	function __construct(){

	}
	public function getPage($user_id,$url){
		$sql = 'Select upe.id as ExpId, upe.*, usp.* from user_page_explorer upe, user_page_static usp where upe.url="'.$url.'" and upe.user_id = '.$user_id.' and upe.static_nr = usp.id';
		
		parent::setSqlManuel($sql);
	    $this->page = parent::result(1);
	    
		return $this->page;
	}
	public function getPageMain($user_id,$url){
	    $sql = 'Select upe.id as ExpId, upe.*,usp.* from user_page_explorer upe, user_page_static usp where upe.user_id = '.$user_id.' and upe.static_nr = usp.id and upe.main_flag = 1';	

		parent::setSqlManuel($sql);
	    $this->page = parent::result(1);
		return $this->page;
	}
}

?>